3.171 \(\int \frac{8+x^2}{6-5 x+x^2} \, dx\)

Optimal. Leaf size=18 \[ x-12 \log (2-x)+17 \log (3-x) \]

[Out]

x - 12*Log[2 - x] + 17*Log[3 - x]

________________________________________________________________________________________

Rubi [A]  time = 0.017693, antiderivative size = 18, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.188, Rules used = {1657, 632, 31} \[ x-12 \log (2-x)+17 \log (3-x) \]

Antiderivative was successfully verified.

[In]

Int[(8 + x^2)/(6 - 5*x + x^2),x]

[Out]

x - 12*Log[2 - x] + 17*Log[3 - x]

Rule 1657

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 632

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[
(c*d - e*(b/2 - q/2))/q, Int[1/(b/2 - q/2 + c*x), x], x] - Dist[(c*d - e*(b/2 + q/2))/q, Int[1/(b/2 + q/2 + c*
x), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] && NiceSqrtQ[b^2 - 4*a*
c]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \frac{8+x^2}{6-5 x+x^2} \, dx &=\int \left (1+\frac{2+5 x}{6-5 x+x^2}\right ) \, dx\\ &=x+\int \frac{2+5 x}{6-5 x+x^2} \, dx\\ &=x-12 \int \frac{1}{-2+x} \, dx+17 \int \frac{1}{-3+x} \, dx\\ &=x-12 \log (2-x)+17 \log (3-x)\\ \end{align*}

Mathematica [A]  time = 0.0043541, size = 18, normalized size = 1. \[ x-12 \log (2-x)+17 \log (3-x) \]

Antiderivative was successfully verified.

[In]

Integrate[(8 + x^2)/(6 - 5*x + x^2),x]

[Out]

x - 12*Log[2 - x] + 17*Log[3 - x]

________________________________________________________________________________________

Maple [A]  time = 0.049, size = 15, normalized size = 0.8 \begin{align*} x+17\,\ln \left ( -3+x \right ) -12\,\ln \left ( -2+x \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2+8)/(x^2-5*x+6),x)

[Out]

x+17*ln(-3+x)-12*ln(-2+x)

________________________________________________________________________________________

Maxima [A]  time = 0.991097, size = 19, normalized size = 1.06 \begin{align*} x - 12 \, \log \left (x - 2\right ) + 17 \, \log \left (x - 3\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+8)/(x^2-5*x+6),x, algorithm="maxima")

[Out]

x - 12*log(x - 2) + 17*log(x - 3)

________________________________________________________________________________________

Fricas [A]  time = 1.65817, size = 47, normalized size = 2.61 \begin{align*} x - 12 \, \log \left (x - 2\right ) + 17 \, \log \left (x - 3\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+8)/(x^2-5*x+6),x, algorithm="fricas")

[Out]

x - 12*log(x - 2) + 17*log(x - 3)

________________________________________________________________________________________

Sympy [A]  time = 0.099877, size = 14, normalized size = 0.78 \begin{align*} x + 17 \log{\left (x - 3 \right )} - 12 \log{\left (x - 2 \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2+8)/(x**2-5*x+6),x)

[Out]

x + 17*log(x - 3) - 12*log(x - 2)

________________________________________________________________________________________

Giac [A]  time = 1.27402, size = 22, normalized size = 1.22 \begin{align*} x - 12 \, \log \left ({\left | x - 2 \right |}\right ) + 17 \, \log \left ({\left | x - 3 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+8)/(x^2-5*x+6),x, algorithm="giac")

[Out]

x - 12*log(abs(x - 2)) + 17*log(abs(x - 3))